Skip to content

Conversation

johnzl-777
Copy link
Contributor

@johnzl-777 johnzl-777 commented Sep 29, 2025

Also included a repetition code - like unit test. I figure this would be nice to have first before working on #498

I believe this should be backportable too which would be great because I'd like to use the flatten pass elsewhere instead of having identical versions floating around (:

@johnzl-777 johnzl-777 added the enhancement New feature or request label Sep 29, 2025
@johnzl-777 johnzl-777 requested a review from kaihsin September 29, 2025 19:16
@johnzl-777 johnzl-777 added the squin squin related issues label Sep 29, 2025
Copy link
Contributor

github-actions bot commented Sep 29, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
10758 9371 87% 0% 🟢

New Files

File Coverage Status
src/bloqade/stim/passes/flatten.py 79% 🟢
TOTAL 79% 🟢

Modified Files

File Coverage Status
src/bloqade/pyqrack/squin/op.py 100% 🟢
src/bloqade/squin/_init_.py 100% 🟢
src/bloqade/squin/_typeinfer.py 100% 🟢
src/bloqade/squin/qubit.py 100% 🟢
src/bloqade/squin/rewrite/U3_to_clifford.py 87% 🟢
src/bloqade/stim/passes/_init_.py 100% 🟢
src/bloqade/stim/passes/simplify_ifs.py 100% 🟢
src/bloqade/stim/passes/squin_to_stim.py 100% 🟢
src/bloqade/stim/rewrite/_init_.py 100% 🟢
src/bloqade/stim/rewrite/ifs_to_stim.py 87% 🟢
src/bloqade/stim/rewrite/qubit_to_stim.py 86% 🟢
src/bloqade/stim/rewrite/squin_measure.py 90% 🟢
src/bloqade/stim/rewrite/squin_noise.py 95% 🟢
src/bloqade/stim/rewrite/util.py 81% 🟢
TOTAL 95% 🟢

updated for commit: b8a034f by action🐍

Copy link

codecov bot commented Sep 29, 2025

Codecov Report

❌ Patch coverage is 89.47368% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/bloqade/stim/rewrite/qubit_to_stim.py 85.71% 7 Missing ⚠️
src/bloqade/stim/passes/flatten.py 78.57% 6 Missing ⚠️
src/bloqade/squin/rewrite/U3_to_clifford.py 86.95% 3 Missing ⚠️
src/bloqade/stim/rewrite/squin_noise.py 95.34% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@johnzl-777 johnzl-777 linked an issue Oct 1, 2025 that may be closed by this pull request
@johnzl-777 johnzl-777 marked this pull request as draft October 2, 2025 02:33
@johnzl-777 johnzl-777 removed the request for review from kaihsin October 2, 2025 02:33
@johnzl-777 johnzl-777 linked an issue Oct 2, 2025 that may be closed by this pull request
@johnzl-777 johnzl-777 changed the title Refactor SquinToStimPass to be more performant Refactor SquinToStimPass for clifford dialect + performance Oct 2, 2025
@johnzl-777
Copy link
Contributor Author

Considering how breaking everything is for #492 I think it's better to just take care of #498 here as well

@johnzl-777 johnzl-777 linked an issue Oct 3, 2025 that may be closed by this pull request
@johnzl-777 johnzl-777 force-pushed the john/squin-to-stim-performance-refactor branch from 9b63bee to 9d86c00 Compare October 7, 2025 02:33
@johnzl-777 johnzl-777 force-pushed the john/squin-to-stim-performance-refactor branch from 2fd6109 to 275ea82 Compare October 10, 2025 13:33
@johnzl-777 johnzl-777 marked this pull request as ready for review October 10, 2025 19:03
Copy link
Collaborator

@david-pl david-pl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good! I just have a couple of high-level comments.



@statement(dialect=dialect)
class Reset(ir.Statement):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement needs a pyqrack method and a cirq emit method impl. I can also add those, if you like. So either add them here, or a create a new issue and assign it to me, please.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make an issue, thank you! (See #546 )

Copy link
Contributor

@kaihsin kaihsin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, as long as the remaining @david-pl's comments get addressed

@johnzl-777 johnzl-777 merged commit 17d0336 into main Oct 14, 2025
11 checks passed
@johnzl-777 johnzl-777 deleted the john/squin-to-stim-performance-refactor branch October 14, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request squin squin related issues

Projects

None yet

4 participants